ποΈGitΠ―ΡΠ°ποΈ
Node / meshtastic / Meshtastic-Android / files / specs / 20260711-153545-message-markdown-styling / data-model.md
specs/20260711-153545-message-markdown-styling/data-model.md docs/obtainium-generated-deeplinks (42f311dd) Text, 3.37 KB
Phase 1 Data Model: Message Inline Markdown Styling
No persisted entities, no database migration, no protobuf changes. Markdown is parsed at render time and styled at display time; nothing is stored. This document defines only the in-memory types the parser and renderer pass around.
Coordinate systems
β’ Raw text β the exact bytes the user typed / that arrived on the mesh, delimiters included (T383838"a **b** c"). This is what T383838TextFieldState.text holds and what T383838sendMessage transmits.
β’ Display text β delimiters stripped, mentions substituted to display names (T383838"a b c"). All spans are expressed in display-space offsets.
β’ The parser is responsible for producing the display string and the spans in one pass so offsets are internally consistent (research R3).
Types (in-memory, T383838commonMain, no Compose dependency)
T383838InlineStyle (enum)
The five inline styles, parity with iOS T383838MarkdownStyle.
βββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β Value β Delimiter(s) β Rendered as β
βββββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ€
β T383838Bold β T383838** β T383838FontWeight.Bold β
β T383838Italic β T383838* β T383838FontStyle.Italic β
β T383838Strikethrough β T383838~~ β T383838TextDecoration.LineThrough β
β T383838Code β BT383838 β T383838FontFamily.Monospace β
β T383838Link β T383838